hour=int(input())
salary=0.0
if hour>120:
    salary=80*120+(hour-120)*80*1.15
    print(f"工资为{salary:.2f}")
elif hour<=120 and hour>60:
    salary=hour*80
    print(f"工资为{salary:.2f}")
elif hour>=0 and hour<60:
    salary=hour*80-700
    print(f"工资为{salary:.2f}")
else:
    print("Error")
    
